//
//  KAboutUSViewController.m
//  Keping
//
//  Created by Joanlove on 2017/12/31.
//  Copyright © 2017年 柯平. All rights reserved.
//

#import "KAboutUSViewController.h"
#import "KVersionViewController.h"

@interface KAboutUSViewController ()

@property (nonatomic, weak) IBOutlet UILabel *faqLbl;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *aboutHeight;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *faqTop;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *faqBottom;

@end

@implementation KAboutUSViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
    if (kScreenHeight == 480) {
        self.aboutHeight.constant = 80 - 74 - 10 + 10;
        self.faqTop.constant = 10.0;
        self.faqBottom.constant = 10.0;
    } else if (kScreenHeight == 568) {
        self.aboutHeight.constant = 140 - 74 + 10;
    } else {
        self.aboutHeight.constant = 240 - 74 + 10;
    }
    NSDictionary *attribtDic = @{NSUnderlineStyleAttributeName: [NSNumber numberWithInteger:NSUnderlineStyleSingle]};
    NSMutableAttributedString *attribtStr = [[NSMutableAttributedString alloc]initWithString:self.faqLbl.text attributes:attribtDic];
    self.faqLbl.attributedText = attribtStr;
    self.faqLbl.userInteractionEnabled = YES;
    UITapGestureRecognizer *gesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(pushFAQ)];
    [self.faqLbl addGestureRecognizer:gesture];
    
}

- (void)pushFAQ {
    KVersionViewController* vc = [KVersionViewController new];
    vc.title = @"FAQ";
    vc.isWebView = YES;
    [self.navigationController pushViewController:vc animated:YES];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
